package com.wx.mall.operate.controller;


import com.wx.mall.common.api.CommonResult;
import com.wx.mall.operate.entity.Config;
import com.wx.mall.operate.service.IConfigService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 配置表 前端控制器
 * </p>
 *
 * @author j
 * @since 2020-05-28
 */
@RestController
@RequestMapping("/config")
@Api(tags = "配置表")
public class ConfigController {

    @Resource
    private IConfigService service;

    @ApiOperation("查看广告配置")
    @GetMapping("/getList")
    public CommonResult<List<Config>> getList(){


        return CommonResult.success(service.list());
    }
}

